#输入一串数字，用冒泡排序的算法给其排序
num = [1,23,45,57,43,23,47]
for i in range(len(num),0,-1):
    fiag = 0
    for j in range(i-1):
            if num[j] > num[j+1]:
                num[j],num[j+1]=num[j+1],num[j]
            fiag = 1
    if not fiag:
        break
print(num)